#define _CRT_SECURE_NO_WARNINGS
#define N 10
#include <stdio.h>
int main()
{
	int a[N], i, j, min, t;
	for (i = 0; i < N; i++)
		scanf("%d", &a[i]);//(a+i)=&a[i]
	for (i = 0; i < N - 1; i++)
	{
		min = i;
		for (j = i + 1; j < N; j++)
			if (a[min] > a[j])
				min = j;
		t = a[i]; a[i] = a[min]; a[min] = t;
	}
				for (i = 0; i < N; i++)				
					printf("%5d", a[i]);
					printf("\n");			
}